import { BasicAndQuoteType, computeFnType } from "../commonType";
import { basicOperatorEnum, quoteOperatorEnum, operatorPriorityEnum } from "../enum";

// export type basicOperatorEnum = `${basicOperatorEnum}`;
// export type quoteOperatorEnum = `${quoteOperatorEnum}`;

/**
 * (加减乘除)操作符实例化时的基本信息参数对象
 */
export interface OperatorInfoType extends Pick<BasicAndQuoteType, 'basic' | 'quote'> {
    basic: basicOperatorEnum;
    quote: quoteOperatorEnum;
    priority: operatorPriorityEnum;
}

/**
 * (加减乘除)操作符实例上的接口
 */
export interface OperatorType extends Pick<BasicAndQuoteType, 'getBasic' | 'getQuote'> {
    action: computeFnType; // [bugfix]之前是Function导致不约束参数
    getBasic(): basicOperatorEnum;
    getQuote(): quoteOperatorEnum;
    getPriority(): operatorPriorityEnum;
}
